/*
 * Dimension.hpp
 *
 *  Created on: 23-11-2010
 *      Author: Przemek
 */

#pragma once

#include "geometry/Vector.hpp"

/*
 * A class representing a size in Cartesian plane. It's based on vector class.
 */
class Dimension
{
	private:
		Vector size;

	public:
		explicit Dimension(float width = 0, float height = 0);
		Dimension(int width, int height);
		Dimension(const Dimension& other);

		float getWidth() const;
		void setWidth(int width);
		void setWidth(float width);

		float getHeight() const;
		void setHeight(int height);
		void setHeight(float height);

		const Vector& toVector() const;

		Dimension operator+(const Dimension& other) const;
		Dimension operator-(const Dimension& other) const;

		Dimension& operator=(const Dimension& other);
		bool operator==(const Dimension& other) const;
		bool operator!=(const Dimension& other) const;

	private:
		Dimension operator-() const;
};
